package com.cntaiping.ft.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author xc.yangbk
 * @date 2021年12月16日 15:23
 */
@Controller
@RequestMapping(value = "hello")
public class HelloController {
    //读取配置动态参数
    @Value("${runEvn}")
    private String runEvn;

    @GetMapping("/test")
    public String test() {
        return "this spring boot " + runEvn + " date long " +
                System.currentTimeMillis();
    }

    @GetMapping(value = "index")
    public String helloIndex() {
        return "/index";
    }
}
